package com.coolbi.security.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.coolbi.security.biz.UserToGroupBiz;
import com.coolbi.security.dao.UserToGroupDao;
import com.coolbi.security.entity.User;
import com.coolbi.security.entity.UserGroup;
import com.coolbi.security.entity.UserToGroup;

public class UserToGroupBizImpl implements UserToGroupBiz {

	@Autowired
	private UserToGroupDao userToGroupDao;
	public void setUserToGroupDao(UserToGroupDao userToGroupDao) {
		this.userToGroupDao = userToGroupDao;
	}

	@Override
	public List<UserGroup> findGroupByUserId(long id) {
		return userToGroupDao.findGroupByUserId(id);
	}

	@Override
	public List<UserToGroup> find(Map<String, Object> parameter) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<UserToGroup> find(Map<String, Object> parameter, int offset,
			int limit) {
		return userToGroupDao.find(parameter, offset, limit);
	}

	@Override
	public int count(Map<String, Object> parameter) {
		return userToGroupDao.count(parameter);
	}

	@Override
	public int countByKeyword(String keyword) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<UserToGroup> search(String keyword, int offset, int limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public UserToGroup save(UserToGroup obj) {
		return userToGroupDao.save(obj);
	}

	@Override
	public int update(UserToGroup obj) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int delete(long id) {
		return userToGroupDao.delete(id);
	}

	@Override
	public UserToGroup get(long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<UserToGroup> list() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<UserToGroup> list(int offset, int limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int count() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByGroupId(long id) {
		return userToGroupDao.deleteByGroupId(id);
	}

	@Override
	public List<User> findUserByGroupId(Map<String, Object> parameter, int offset,
			int limit) {
		return userToGroupDao.findUserByGroupId(parameter, offset, limit);
	}

}
